package homework.map;

import java.util.*;

public class MapTest {

    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("12","wang");
        map.put("13","wang");
        map.put("11","wang");
        map.put("14","liang");
        System.out.println(map);

        System.out.println("-----------------------");
        boolean isExist = map.containsKey("11");
        System.out.println(isExist);
        System.out.println("-----------------------");
        isExist = map.containsValue("liang");
        System.out.println(isExist);
        System.out.println("-----------------------");
        map.remove("12","wang");
        System.out.println(map);
        System.out.println("-----------------------");
        if (map.containsKey("11")){
            map.put("11","li");

        }
        System.out.println(map);
        System.out.println("-----------------------");
        map.clear();
        System.out.println(map.isEmpty());





    }




}
